<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>捷易通订单查询</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
<#include "../template/template_editPage.ftl">
<#include "../template/include/assign.ftl">
<#include "../template/include/source.ftl">
    <link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
        .page {
            float: right;
            padding-top: 15px;
            margin-right: 15px;
        }
    </style>

</head>
<body class="list">
<script type="text/javascript">
    $().ready(function () {

        var $validateErrorContainer = $("#validateErrorContainer");
        var $validateErrorLabelContainer = $("#validateErrorContainer ul");
        var $validateForm = $("#inputForm");
        var $tab = $("#tab");
        // Tab效果
        $tab.tabs(".tabContent", {
            tabs:"input"
        });

        // 表单验证
        $validateForm.validate({
            errorContainer:$validateErrorContainer,
            errorLabelContainer:$validateErrorLabelContainer,
            wrapper:"li",
            errorClass:"validateError",
            ignoreTitle:true,
            rules:{
                "requestid":{
                    required:true
                },
                "userid":{
                    required:true
                }

            },
            messages:{
                "requestid":{
                    required:"请输入订单号!"
                },
                "userid":{
                    required:"请选择商户编号!"
                }

            },
            submitHandler:function (form) {
                //$(form).find(":submit").attr("disabled", true);
                form.submit();
            }
        });

    <#if actionErrors?? && (actionErrors?size > 0)>
        $.dialog({type:"warn", content:"<#list errorMessages as list>${list}<br></#list>",
            modal:true, autoCloseTime:3000});
    </#if>

    });


</script>
<div class="body">
    <div class="listBar">
        <h1><span class="icon">&nbsp;</span>捷易通订单查询&nbsp;</h1>
    </div>
    <div style="display: none;" id="validateErrorContainer" class="validateErrorContainer">
        <div class="validateErrorTitle" id="validateErrorTitle">以下信息填写有误,请重新填写</div>
        <ul></ul>
    </div>
    <form id="inputForm" class="validate" action="${web_base}/game/jpay!orderQuery.htm" method="post">
        <div class="operateBar">
            代理商编号：<select name="userid" id="userid" class="formText {required: true}">
            <option value="">-请选择-</option>
            <option value="123" <#if (orderInfo.userid=="123")!false>selected="selected" </#if>>
                123
            </option>
        </select>
            可查订单天数：<select name="history" id="history" class="formText {required: false}">
            <option value="">-请选择-</option>
            <option value="0" <#if (orderInfo.history=="0")!false>selected="selected" </#if>>
                为三天内(含三天)订单
            </option>
            <option value="1" <#if (orderInfo.history=="1")!false>selected="selected" </#if>>
                为三天外订单
            </option>
        </select>
            手拉手订单编号：<input type="text" id="requestid" name="requestid"
                           value="<#if orderInfo??>${(orderInfo.requestid)!}</#if>"
                           onkeyup="this.value=this.value.replace(/\D/g,'')" 
                    	   onafterpaste="this.value=this.value.replace(/\D/g,'')" />*
            <input type="submit" id="searchButton" class="addButton" value="查询"/>

        </div>
    </form>
    <table class="listTable">
        <tr>
            <th>
                <span class="sort" name="resultno">返回状态</span>
            </th>
            <th>
                <span class="sort" name="mobile">充值账号</span>
            </th>
            <th>
                <span class="sort" name="requestid">代理商系统订单号</span>
            </th>
            <th>
                <span class="sort" name="amount">请求金额(元)</span>
            </th>
            <th>
                <span class="sort" name="price">实扣金额(元)</span>
            </th>
        </tr>
        <#if orderInfo??>
                <tr>
                    <td>
                        <#if orderInfo.resultno?? && (orderInfo.resultno=="00" || orderInfo.resultno=="0")>
                            请求成功
                            <#elseif orderInfo?? && orderInfo.resultno?? && (orderInfo.resultno=="01" || orderInfo.resultno=="1")>
                           提交成功，正在充值 
                            <#elseif orderInfo?? && orderInfo.resultno?? && (orderInfo.resultno=="02" || orderInfo.resultno=="2")>
                          充值成功  
                            <#elseif orderInfo?? && orderInfo.resultno?? && (orderInfo.resultno=="03" || orderInfo.resultno=="3")>
                       充值失败         
                            <#elseif orderInfo?? && orderInfo.resultno?? && (orderInfo.resultno=="04" || orderInfo.resultno=="4")>
                       部分退款                 
                        <#elseif balanceInfo?? && balanceInfo.resultno?? && (balanceInfo.resultno=="09" || balanceInfo.resultno=="9")>
                       用户帐号异常
                        <#elseif orderInfo?? && orderInfo.resultno?? && orderInfo.resultno=="11">
                            地区维护
                        <#elseif orderInfo?? && orderInfo.resultno?? && orderInfo.resultno=="13">
                            系统维护
                        <#elseif orderInfo?? && orderInfo.resultno?? && orderInfo.resultno=="14">
                            校验失败
                        <#elseif orderInfo?? && orderInfo.resultno?? && orderInfo.resultno=="15">
                            缺少参数
                        <#elseif orderInfo?? && orderInfo.resultno?? && orderInfo.resultno=="17">
                            无此订单
                        <#elseif orderInfo?? && orderInfo.resultno?? && orderInfo.resultno=="21">
                            非绑定IP
                        <#elseif orderInfo?? && orderInfo.resultno?? && orderInfo.resultno=="23">
                        查询频率过快
                        <#elseif orderInfo?? && orderInfo.resultno?? && orderInfo.resultno=="99">
                            未知错误
                        </#if>
                    </td>
                    <td>
                    ${(orderInfo.mobile)!}
                    </td>
                    <td>
                    ${(orderInfo.requestid)!}
                    </td>
                    <td>
                    ${(orderInfo.amount)!}
                    </td>
                    <td>
                    ${(orderInfo.price)!}
                    </td>
                </tr>
        </#if>



    </table>
<#if !orderInfo??>
    <div class="noRecord">
        <span id="span">请选择代理商编号进行查询!</span>
    </div>
</#if>
</div>

</body>
</html>